import { COUNTER_INCREASE, COUNTER_DESCREASE } from './actions';
import Immutable from 'immutable';
import { handleActions } from 'redux-actions';

const initialState = Immutable.fromJS({
  number: 2,
})

export default handleActions({
  [COUNTER_INCREASE] (state, action) {
    return state.set('number', state.get('number') + 1);
  },
  [COUNTER_DESCREASE] (state, action) {
    return state.set('number', state.get('number') - 1);
  },
}, initialState);
